@extends('layouts.information')

@section('content')
<div class="row">
    <div class="col-sm-12 us_sheet_ves">
        <div class="us_sheet">
            <div class="us_sheet-child">
                <table>
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>名称</th>
                        <th>展示名称</th>
                        <th>创建时间</th>
                        <th>修改时间</th>
                        <th></th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($roles as $role)
                    <tr>
                        <td><a href="{{ route('role.show',['user'=>$role->id])}}">{{ $role->id }}</a></td>
                        <td>{{ $role->name }}</td>
                        <td>{{ $role->display_name }}</td>
                        <td>{{ $role->created_at }}</td>
                        <td>{{ $role->updated_at }}</td>
                        <td>
                            <ul>
                                <li>
                                    <a href="{{ route('role.show', [ 'id'=> $role->id ]) }}">查看</a>
                                </li>
                                <li>
                                    <a href="{{ route('role.edit', [ 'id'=> $role->id ]) }}">编辑</a>
                                </li>
                                <li>
                                    <a href="{{ route('permission.index', [ 'role_id'=> $role->id ]) }}">查看权限</a>
                                </li>
                            </ul>
                        </td>
                    </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
        </div>
        <nav class="pull-right">
            {{ $roles->links() }}
        </nav>
    </div>
</div>

<ul>
    <li>
        <a href="{{ route('role.create') }}">创建</a>
    </li>
</ul>
@endsection
